package com.hmall.item.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 商品表
 * @TableName tb_item
 */
@TableName(value ="tb_item")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class TbItem implements Serializable {
    /**
     * 商品id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * SKU名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 价格（分）
     */
    @TableField(value = "price")
    private Long price;

    /**
     * 库存数量
     */
    @TableField(value = "stock")
    private Integer stock;

    /**
     * 商品图片
     */
    @TableField(value = "image")
    private String image;

    /**
     * 类目名称
     */
    @TableField(value = "category")
    private String category;

    /**
     * 品牌名称
     */
    @TableField(value = "brand")
    private String brand;

    /**
     * 规格
     */
    @TableField(value = "spec")
    private String spec;

    /**
     * 销量
     */
    @TableField(value = "sold")
    private Integer sold;

    /**
     * 评论数
     */
    @TableField(value = "comment_count")
    private Integer commentCount;

    /**
     * 是否是推广广告，true/false
     */
    @TableField(value = "isAD")
    private Integer isAD;

    /**
     * 商品状态 1-正常，2-下架，3-删除
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}